package com.stlm2.dems.entity;

/**
 * Created by ZLQ on 2017/6/10.
 */
public enum FlowType {
//    1、+  2、 -
    Add(1) {
        public String toString() {
            return "+";
        }
    },
    Reduce(2) {
        public String toString() {
            return "-";
        }
    };
    private final int val;

    FlowType(int n) {
        val = n;
    }

    public int getIntValue() {
        return val;
    }

    public static FlowType getByIntValue(int n) {
        switch (n) {
            case 1:
                return  Add;
            case 2:
                return Reduce;

            default:
                return null;
        }
    }
}
